local Class = require("Core.Class")
local LuaBehaviour = require("Core.LuaBehaviour")
local Coroutine = require("Core.Coroutine")
local UnityUtils = require("Game.Util.UnityUtils")

--- @class Explode
local Explode = Class("Explode", LuaBehaviour)

function Explode:OnEnable()
    local waitExplodeEnd = Coroutine.Create(bind(UnityUtils.WaitFormSecond), 0.5, function ()
        CSE.Object.Destroy(self.gameObject)
    end)
    self.host:StartCoroutine(waitExplodeEnd)
end

return Explode